package com.hk;

import com.hk.Impl.SellImpl;

import java.lang.reflect.Proxy;


public class MainTest {
    public static void main(String[] args) {
//        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles","true");
        System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles","true");
        Sell sell=new SellImpl();
        MyInvo myInvo=new MyInvo(sell);
        Sell sell1=(Sell) Proxy.newProxyInstance(sell.getClass().getClassLoader(),
                sell.getClass().getInterfaces(),myInvo);
        sell1.SellCar(2);
    }
}
